	$(function() {
		$(".btn1").click(function() {
			if(confirm("确定修改吗?") == true) {
			    alert("修改成功！")	;		   				
				return true;
			}
			else {
			    alert("修改失败！");
				return false;
			}
		});
	});  
	/* $(function() {
	 $(".btn1").click(function(){  
	     var  userUsername = $("#userUsername").val();
	     alert(userUsername);
	     $.ajax({
    		url : 'update/1',
    		type : 'post',
    		data : {"userUsername" : userUsername},
    		dataType : 'json',
    		success : function(data){ 
    		   alert("12113");
    		 },
    		 error:function(){    			
    			 $.toptip("出错了",'error'); 
    		}
    		 
    		 }); 
	 });     
	 }); */
	 $(function() {
	 $("#userUsername").blur(function(){  
	     var  userUsername = $("#userUsername").val();	    
	     if(userUsername == null || userUsername == ""){
	     document.getElementById("userUsernameInfo").innerHTML="请输入姓名";    		
    		return false;
    	}
    	else{
    	   document.getElementById("userUsernameInfo").innerHTML="";
    	   return true;
    	}
     });   
     $("#userPhone").blur(function(){  
	     var  userPhone = $("#userPhone").val();	    
	     if(userPhone == null || userPhone == ""){
    		 document.getElementById("userPhoneInfo").innerHTML="请输入手机号";    		
    		return false;
    	}
    	else if(!(/^1[34578]\d{9}$/.test(userPhone))){
    		document.getElementById("userPhoneInfo").innerHTML="手机号格式不正确";    		
    		return false;
    	}
    	else{
    	  document.getElementById("userPhoneInfo").innerHTML="";
    	   return true;
    	}
     });   
     
     $("#userEmail").blur(function(){  
	     var  userEmail = $("#userEmail").val();	    
	     if(userEmail == null || userEmail == ""){
    		 document.getElementById("userEmailInfo").innerHTML="请输入邮箱";    		
    		return false;
    	}
    	else if(!(/^\w+@[a-zA-Z0-9]{2,10}(?:\.[a-z]{2,4}){1,3}$/.test(userEmail))){
    		document.getElementById("userEmailInfo").innerHTML="邮箱格式不正确";    		
    		return false;
    	}
    	else{
    	  document.getElementById("userEmailInfo").innerHTML="";
    	   return true;
    	}
     });   
      $("#userPassword").blur(function(){  
	     var  userPassword = $("#userPassword").val();	    
	     if(userPassword == null || userPassword == ""){
	     document.getElementById("passwordInfo").innerHTML="请输入密码";    		
    		return false;
    	}
    	else{
    	   document.getElementById("passwordInfo").innerHTML="";
    	   return true;
    	}
     });   
     $("#repassword").blur(function(){  
	     var  repassword = $("#repassword").val();	 
	     var  userPassword = $("#userPassword").val();	
	     if(repassword!=userPassword){
	     document.getElementById("repasswordInfo").innerHTML="确认密码与原密码不一致";    		
    		return false;
    	}
    	else{
    	   document.getElementById("repasswordInfo").innerHTML="";
    	   return true;
    	}
     });   
	       
	 });